package com.fyp.client.ptma.model;

import org.simpleframework.xml.Element;
import org.simpleframework.xml.Root;

import android.os.Parcel;
import android.os.Parcelable;

@Root(name = "versionPk")
public class ApplicationVersionPk implements Parcelable
{

	@Element
	private String version;

	Application application;

	/******************************************************************************************/

	public String getVersion()
	{
		return version;
	}

	public void setVersion(String version)
	{
		this.version = version;
	}

	public Application getApplication()
	{
		return application;
	}

	public void setApplication(Application application)
	{
		this.application = application;
	}

	@Override
	public int describeContents()
	{
		// TODO Auto-generated method stub
		return 0;
	}

	public static final Parcelable.Creator<ApplicationVersionPk> CREATOR = new Parcelable.Creator<ApplicationVersionPk>()
	{
		public ApplicationVersionPk createFromParcel(Parcel in)
		{
			return new ApplicationVersionPk(in);
		}

		public ApplicationVersionPk[] newArray(int size)
		{
			return new ApplicationVersionPk[size];
		}
	};

	private ApplicationVersionPk(Parcel in)
	{
		application = in.readParcelable(Application.class.getClassLoader());
		version = in.readString();

	}

	public ApplicationVersionPk()
	{

	}

	@Override
	public void writeToParcel(Parcel dest, int flags)
	{
		dest.writeParcelable(application,
				Parcelable.PARCELABLE_WRITE_RETURN_VALUE);
		dest.writeString(version);

	}
}
